Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD][14.0] upgrade_analysis: generate noupdate changes #7

Conversation

StefanRijnhart
Copy link

No description provided.

Copy link
Owner

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !

Just a superficial review for the time being. (just two remarks inline).
I'll take a look in the next days.

"""
self.ensure_one()
connection = self.config_id.get_connection()
remote_record_obj = connection.env["openupgrade.record"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to replace by
remote_record_obj = self._get_remote_model(connection, "record")

so it will work for any remote version. (13- or 14+)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed!

from odoo.tools.translate import _

try:
from odoo.addons.openupgrade_records.apriori import renamed_modules
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you meant : ?

     from odoo.addons.openupgrade_scripts.apriori import renamed_modules

https://github.com/grap/openupgrade-framework/blob/14.0/openupgrade_scripts/apriori.py

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fixed!

@StefanRijnhart StefanRijnhart force-pushed the add/14.0/upgrade_analysis/generate_noupdate_changes branch from c95eb7a to 7a5076c Compare December 12, 2020 07:29
@legalsylvain
Copy link
Owner

Hi @StefanRijnhart. thanks a lot for this work. I made a partial review. I checked some result, in the product file, and it looks great.

Comparison

    <!-- V13 addons/product -->
        <record forcecreate="True" id="decimal_volume" model="decimal.precision">
            <field name="name">Volume</field>
            <field name="digits">2</field>
        </record>
        <record forcecreate="True" id="decimal_product_uom" model="decimal.precision">
            <field name="name">Product Unit of Measure</field>
            <field name="digits" eval="3"/>
        </record>

    <!-- V14 addons/product -->

        <record forcecreate="True" id="decimal_volume" model="decimal.precision">
            <field name="name">Volume</field>
            <field name="digits">2</field>
        </record>
        <record forcecreate="True" id="decimal_product_uom" model="decimal.precision">
            <field name="name">Product Unit of Measure</field>
            <field name="digits" eval="2"/>
        </record>

Result
(https://github.com/grap/openupgrade-framework/pull/5/files#diff-4949dab4cf4a99c82e081bf03aa7018e96de540741149a2c80247c12acc5a63a)


  <record id="decimal_product_uom" model="decimal.precision" forcecreate="True">
    <field name="digits" eval="2"/>
  </record>
  • no decimal_volume : OK, because no changes.
  • Change of a field in decimal_product_uom : OK just regarding the field digits.

propose an optimistic merge so !

kind regards.

@legalsylvain legalsylvain merged commit 647aa33 into legalsylvain:14.0-ADD-upgrade_analysis Dec 14, 2020
@StefanRijnhart
Copy link
Author

Thanks for the merges!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants